macOS: do not call fuse_session_fd before fuse_daemonise#374
Open
dmik wants to merge 1 commit into
Open
Conversation
Collaborator
|
Please see my comment #373 (comment) |
bfleischer
reviewed
Jul 6, 2026
| } | ||
|
|
||
| #if !defined(__CYGWIN__) | ||
| res = fcntl(fuse_session_fd(se), F_SETFD, FD_CLOEXEC); |
Collaborator
There was a problem hiding this comment.
This line forces macFUSE 5.3.3 and later to materialize the delayed mount. Starting with macFUSE 5.3.3, fuse_daemonize() will no longer perform the fork(), after the mount has been materialized.
This prevents forking on macFUSE 5.3.3+ so that sshfs continues to run in foreground. According to macFUSE maintainer, this call is not needed with recent macFUSE at all. See libfuse#373 for more info.
Author
|
Please also back port it to the 2.x branch. I tested the patch locally and it works well with macFUSE 5.3.3. It's also worth removing this from #ifdef __APPLE__
# include <fuse_darwin.h>
#endifas macFUSE 5.x doesn't have it (and doesn't need it). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This appears to be the right sequence and also fixes ObjC/fork issues on macOS with macFUSE 5.2.0+ (see #373).